package com.naiterui.ehp.bs.patient.enums;

public enum CouponType {
    /**
     * <五元>
     */
    FIVE (1, "5.00"),
    /**
     * <十元>
     */
    TEN (2, "10.00"),
    /**
     * <二十元>
     */
    TWENTY (3, "20.00");

    private final int type;
    private final String value;

    CouponType(int type, String value) {
        this.type = type;
        this.value = value;
    }

    public int type() {
        return this.type;
    }

    public String value() {
        return this.value;
    }

    public static CouponType typeFromValue(String value) {
        for (CouponType ct : CouponType.values()) {
            if (ct.value.equals(value)) {
                return ct;
            }
        }
        return null;
    }
}
